package com.zuihai.app.mvp.model.entity;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.zuihai.app.mvp.model.api.Api;

/**
 * Created by Administrator on 2017/6/8 0008.
 */

public class MessageResponse {
    @SerializedName("code")
    @Expose
    public String code;
    @SerializedName("msg")
    @Expose
    public String msg;
    @SerializedName("data")
    @Expose
    public String data;

    @Override
    public String toString() {
        return "BaseJson{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                ", date=" + data +
                '}';
    }

    /**
     * 请求是否成功
     *
     * @return
     */
    public boolean isSuccess() {
        if (code.equals(Api.RequestSuccess)) {
            return true;
        } else {
            return false;
        }
    }
}
